#include<bits/stdc++.h>
using namespace std;
class CPeople
{
    protected:
        string name,sex;
        int age;
    public:
        CPeople(){}
        CPeople(string _na,string _se,int _age)
        {
            name=_na;
            sex=_se;
            age=_age;
        }
        void display()
        {
            cout<<"People:\n";
            cout<<"Name: "<<name<<"\n";
            cout<<"Sex: "<<sex<<"\n";
            cout<<"Age: "<<age<<"\n";
            cout<<"\n";
        }
};
class CStudent:virtual public CPeople
{
    protected:
        string numID;
        double Score;
    public:
        CStudent(){}
        CStudent(string _na,string _se,int _age,string _num,double _sc):CPeople(_na,_se,_age)
        {
            numID=_num;
            Score=_sc;
        }
        void display()
        {
            cout<<"Student:\n";
            cout<<"Name: "<<name<<"\n";
            cout<<"Sex: "<<sex<<"\n";
            cout<<"Age: "<<age<<"\n";
            cout<<"No.: "<<numID<<"\n";
            cout<<"Score: "<<Score<<"\n";
            cout<<"\n";
        }
};
class CTeacher:virtual public CPeople
{
    protected:
        string job,apartment;
    public:
        CTeacher(){}
        CTeacher(string _na,string _se,int _age,string _jo,string _apm):CPeople(_na,_se,_age)
        {
            job=_jo;
            apartment=_apm;
        }
        void display()
        {
            cout<<"Teacher:\n";
            cout<<"Name: "<<name<<"\n";
            cout<<"Sex: "<<sex<<"\n";
            cout<<"Age: "<<age<<"\n";
            cout<<"Position: "<<job<<"\n";
            cout<<"Department: "<<apartment<<"\n";
            cout<<"\n";
        }
};
class CGradOnWork:public CTeacher,public CStudent
{
    protected:
        string judge,teacher;
    public:
        CGradOnWork(string _na,string _se,int _age,string _num,double _sc,string _jo,string _apm,string ju,string te):CPeople(_na,_se,_age)
        {
            numID=_num;
            Score=_sc;
            job=_jo;
            apartment=_apm;
            judge=ju;
            teacher=te;
        }
        void display()
        {
            CPeople::display();
            CStudent::display();
            CTeacher::display();
            cout<<"GradOnWork:\n";
            cout<<"Name: "<<name<<"\n";
            cout<<"Sex: "<<sex<<"\n";
            cout<<"Age: "<<age<<"\n";
            cout<<"No.: "<<numID<<"\n";
            cout<<"Score: "<<Score<<"\n";
            cout<<"Position: "<<job<<"\n";
            cout<<"Department: "<<apartment<<"\n";
            cout<<"Direction: "<<judge<<"\n";
            cout<<"Tutor: "<<teacher<<"\n";
        }
};
int main()
{
    string _na,_se,_num,_jo, _apm,ju, te;
    int _age;
    double _sc;
    cin>>_na>>_se>>_age>>_num>>_sc>>_jo>>_apm>>ju>>te;
    CGradOnWork ans(_na,_se,_age,_num,_sc,_jo,_apm,ju,te);
    ans.display();
}